import request from '@/router/axios';

export const getAttrList = (current, size, params) => {
  return request({
    url: '/api/ocm-product/attrValue/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getAttrDetail = (id) => {
  return request({
    url: '/api/ocm-product/attrValue/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeAttr = (ids) => {
  return request({
    url: '/api/ocm-product/attrValue/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const addAttr = (row) => {
  return request({
    url: '/api/ocm-product/attrValue/save',
    method: 'post',
    data: row
  })
}

export const updateAttr = (row) => {
  return request({
    url: '/api/ocm-product/attrValue/update',
    method: 'post',
    data: row
  })
}
export const getAttrPage = (current, size, params) => {
  return request({
    url: '/api/ocm-product/attrValue/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}
